import com.itheima.ReggieApplication;
import com.itheima.entity.User;
import com.itheima.service.UserService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CachePut;

@SpringBootTest(classes = ReggieApplication.class)
public class Cache {

    @Autowired
    private CacheManager cacheManager;

    @Test
    @CachePut(value = "userCache",key = "#user.id")
     public User cs(User user) {

        return user;
    }
}
